import ACCESS_ENUM from '@/constants/accessEnum.ts'

export const routes = [
  {
    path: '/',
    name: '首页',
    // @ts-ignore
    component: () => import('@/views/HomeView.vue'),
    meta: {},
  },
  {
    path: '/user/login',
    name: '用户登录',
    // @ts-ignore
    component: () => import('@/views/user/UserLoginPage.vue'),
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: '/user/register',
    name: '用户注册',
    // @ts-ignore
    component: () => import('@/views/user/UserRegisterPage.vue'),
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: '/admin/userManage',
    name: '用户管理',
    // @ts-ignore
    component: () => import('@/views/admin/UserManagerPage.vue'),
    meta: {
      access: ACCESS_ENUM.ADMIN,
    },
  },
  {
    path: '/noAuth',
    name: '无权限',
    // @ts-ignore
    component: () => import('@/views/NoAuthPage.vue'),
    meta: {
      hideInMenu: true,
    },
  },
]
